package pdn.sci.cs.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import pdn.sci.cs.action.BaseAction.OPERATION_MODE;
import pdn.sci.cs.entity.GenericList;
import pdn.sci.cs.entity.PoliceStation;
import pdn.sci.cs.entity.GramaSevaka;
import pdn.sci.cs.entity.SessionKey;
import pdn.sci.cs.entity.SystemUser;
import pdn.sci.cs.service.DivisionalSecretariatService;
import pdn.sci.cs.service.PoliceStationService;
import pdn.sci.cs.service.GramaSevakaService;
import pdn.sci.cs.service.GenericListService;
import pdn.sci.cs.service.SystemUserService;

public class PeopleAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	@Autowired private PoliceStationService policeStationService;
	@Autowired private GramaSevakaService gramaSevakaService;
	@Autowired private GenericListService genericListService;
	@Autowired private DivisionalSecretariatService divisionalSecretariatService;
	
	private List<GenericList> personTitleList;
	private List<GenericList> personSexList;
	private List<DevisionalSecretariat> divisionalSecretariatList;
	private List<PoliceStation> policeStationList;
	private List<GramaSevaka> gramaSevakaList;
	
	public String addFrame() {
		viewInit();
		addMode();
		return SUCCESS;
	}
	
	private void viewInit() {
		personTitleList = genericListService.findListByCategoryId("C030");
		personSexList = genericListService.findListByCategoryId("C040");
		divisionalSecretariatList = divisionalSecretariatService.findListByCategoryId("C070");
		policeStationList = policeStationService.findListByCategoryId("C020");
		gramaSevakaList = gramaSevakaService.findListByCategoryId("C010");
	}
	
	protected void addMode() {
		operationMode = OPERATION_MODE.ADD;
	}


}
